home *** CD-ROM | disk | FTP | other *** search
- Path: iwfm05.itwol.bhp.com.au!usenet
- From: Sean T Dwyer <dwyer.sean.st@bhp.com.au>
- Newsgroups: comp.lang.c++
- Subject: Exceptions
- Date: Fri, 05 Jan 1996 11:33:46 -0800
- Organization: BHP-IT Wollongong
- Message-ID: <30ED7D1A.154F@bhp.com.au>
- NNTP-Posting-Host: 134.18.242.89
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b3 (Win16; I)
-
- Is it O.K to throw multiple exceptions from the main() block of a
- program. I have code like this:
-
- main()
- {
- try
- {
- for (blah;blah;blah;)
- {
- if (bogus)
- throw AnException();
- }
- for (blah;blah;blah;)
- {
- if (bogus2)
- throw AnException();
- }
- }
- catch (AnException& ex)
- {
- blah;
- }
- }
-
- I get an Internal error (Index out of range).
- If I move the for loops to a separate function, everything's cool.
-
- Help!!!!!
-
- Sean D.
-